home *** CD-ROM | disk | FTP | other *** search
/ Aminet 52 / Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso / Aminet / util / boot / MemTrailer.readme < prev    next >
Encoding:
Text File  |  2002-10-26  |  2.6 KB  |  83 lines

  1. Short:    Allocates 16 bytes for memory-protection
  2. Author:   p-k@htp-tel.de (Peter Keunecke)
  3. Uploader: p-k@htp-tel.de (Peter Keunecke)
  4. Version:  1.3
  5. Type:     util/boot
  6.  
  7.  Changes since version 1.1:
  8.  
  9. Bugfix: The signature longword was stored on an odd address
  10. in 1.2: whenever an odd number of bytes was allocated ;-(
  11.  
  12. In 1.3: Now, adds 16 bytes with 2 signatures for safety.
  13.         Bypass for zero and negative byte demands and for
  14.         largest-block orders, to keep memory-tests, avail
  15.         and memory-clearing programs running.
  16.  
  17.  
  18.  Description:
  19.  
  20. MemTrailer is a shell-command for the startup-sequence that
  21. will patch the AllocMem() and the FreeMem() exec-functions.
  22.  
  23. Because some programs make illegal accesses past the end of
  24. their own memory-allocations or try to use FreeMem() with an
  25. unaligned argument pointing a few Bytes out of bounds, you
  26. may sometimes get a delayed and unexpected Guru-Meditation.
  27.  
  28. With the debug-tool MungWall you can check your system for
  29. this type of troublemakers. MungMem is a tool, which tries
  30. to solve this problem in nearly all cases, but is relatively
  31. complex and therefore it needs quite an amount of CPU-time.
  32.  
  33. In order to use less CPU-time, I made MemTrailer as simple
  34. as possible with the intention to fix only the most commonly
  35. situations where illegal memory-accesses could happen.
  36.  
  37. MemTrailer patches AllocMem() to get additional 16 Bytes for
  38. each allocation and sets up 2 signatures pointing to the top.
  39. These 16 Bytes are sacrificed to protect other programs from
  40. memory-corruption and the system getting Guru-Meditations.
  41.  
  42. Whenever FreeMem() cannot find a valid signature in the last
  43. longwords, the 16 additional Bytes are left behind in memory.
  44.  
  45. It seems that the Workbench does a lot of small allocations
  46. and therefore runs faster with the original AllocMem(). The
  47. WB behaves as if it preserves the former function vectors?!
  48.  
  49.  
  50.  Installation and usage:
  51.  
  52. Put the command MemTrailer into C: or whereever you like.
  53. Add a line to your startup-sequence close to the bottom or
  54. at least after LoadWB and call MemTrailer just without Run.
  55.  
  56. Make some tests, starting MemTrailer from the Shell first,
  57. before you change your startup-sequence and booting fails!!
  58.  
  59.  
  60.  Startup-sequence:
  61.  ...
  62.  LoadWB
  63.  ...
  64.  MemTrailer
  65.  EndCLI
  66.  
  67.  
  68.  
  69. It would be nice, if you could give me some feedback whether
  70. MemTrailer is working on your system and on which hardware
  71. and software it runs or not, because I'm only testing it on
  72. WinUAE and OS 3.1.
  73.  
  74.  
  75.  Distribution:
  76.  
  77. This program is Freeware and its sourcecode is included.
  78. I don't give any warranties. You are responsible for using
  79. this program and any damage it could cause to your system!
  80.  
  81.  
  82.  Peter Keunecke
  83.